package com.tbit.manager.api;

import com.tbit.manager.api.dto.QuickReplyDTO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;
import java.util.Objects;

@FeignClient(name = ApiConstants.NAME)
public interface QuickReplyApi {

    String PREFIX = ApiConstants.PREFIX + "/quickReply";
    /**
     * @description: 查询快捷回复列表数据
     * @author: mo.shanyong
     * @date: 2025/2/11 15:19
     * @param: quickReplyDTO 查询条件
     * @return: com.tbit.manager.api.view.JsonResult
     */
    @GetMapping(PREFIX + "/queryByPage")
    Map<String, Object> queryByPage(@RequestParam("quickReplyDTOStr") String quickReplyDTOStr);

    /**
     * @description: 新增快捷回复
     * @author: mo.shanyong
     * @date: 2025/2/11 15:34
     * @param: quickReplyDTO 新增数据
     * @return: com.tbit.manager.api.view.JsonResult
     */
    @PostMapping(value = PREFIX + "/add",consumes = "application/json",produces = "application/json")
    void add(@RequestBody QuickReplyDTO quickReplyDTO);
    /**
     * @description: 编辑快捷回复
     * @author: mo.shanyong
     * @date: 2025/2/11 15:40
     * @param: quickReplyDTO 快捷回复修改的内容
     * @return: com.tbit.manager.api.view.JsonResult
     */
    @PutMapping( value = PREFIX + "/edit",consumes = "application/json",produces = "application/json")
    void edit(@RequestBody QuickReplyDTO quickReplyDTO);

    /**
     * @description: 删除快捷回复
     * @author: mo.shanyong
     * @date: 2025/2/11 15:42
     * @param: id 快捷回复id
     * @return: com.tbit.manager.api.view.JsonResult
     */
    @PostMapping( value = PREFIX + "/delete",consumes = "application/json",produces = "application/json")
    void deleteById(@RequestBody Integer id);
}
